#include<stdio.h>
int score;
int main()
{
	scanf("%d", &score);
	if(score >= 90) printf("A");
	else if(score>=60 &&score<90) printf("B");
	else printf("C");
	return 0;
}
